<% content_for :action_nav do %>
<!-- begin action nav -->
<div id="page-nav">
  <ul id="act-nav" class="clear">
    <li><%= link_to _('New Section'), :action => 'index' %></li>
  </ul>
</div>
<!-- /end action nav -->
<% end %>

<%= render :partial => 'form' %>

<% content_for :sidebar do %>
<h3>Sections (<span class="hint"><%= link_to_function _('Reorder sections'), "SectionForm.toggleSortable(this, 0, 'sections')" %></span>)</h3>
<ul id="sections">
  <%= render :partial => 'section', :collection => @sections %>
</ul>

<% if @section.show_paged_articles? -%>
<h3 class="tspace"><%= _('Articles in') %> "<%=h @section.name %>" (<span class="hint"><%= link_to_function _('Reorder pages'), "SectionForm.toggleSortable(this, #{@section.id}, 'pages')" %></span>)</h3>
<% if @section.articles.any? %>
<p>
  <%= _("Drag the icons next to the articles to reorder the way in which these pages show up in the menu for this section.  The top-most article is shown as the default content for this section.") %>
</p>
<ul id="pages" style="margin-top: 5px;">
  <%= render :partial => 'page', :collection => @section.articles %>
</ul>
<p></p>
<% else %>
<p><%= _("You haven't created an pages(articles) for this section yet.") %><%= link_to _'Create one now', :controller => 'articles', :action => 'new' %></p>
<% end %>
<% end -%>
<% end %>